<?php
// action manage the rooms for hotel
$hotel = new Hotel();
$hotel->select($hotel_id);
$rooms = $hotel->getAllRooms();
?>
<a href="?act=edit_room_for_hotel&add=1&hotel_id=<?php echo $hotel_id ?>"><img src="images/add_new.gif">Thêm Phòng</img></a>
<a href="?act=hotels_manager"><img src="images/Back.png"></img></a>	
<table class="tb_table" width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr class="tb_head">
	<td>Thứ tự</td>
    <td>Tên Phòng</td>
	<td>Giá Phòng</td>
    <td>Mô tả</td>
	<td>Khuyến Mãi</td>
	<td>Hình Ảnh</td>
    <td>Thao tác</td>
  </tr>
	<?php $index = 0; ?>
	<?php foreach ($rooms as $room) {?>
		<?php $index++ ?>
  		<tr class="tb_content">
			<td><?php echo $index ?></td>
			<td><?php echo $room->getname() ?></td>
			<?php $currency = new Currency(); $currency->select($room->getcurrency()); ?>
			<td><?php echo $room->getprice().' '.$currency->getcurrency_code() ?>
			<td><?php echo $room->getdescription() ?></td>
			<td><?php echo $room->getpromotion().' %' ?>
			<td><a href="?act=pictures_list_for_room&room_id=<?php echo $room->getid()?>"><img src="/admin/images/edit.gif"></a></td>
			<td><a href="?act=edit_room_for_hotel&room_id=<?php echo $room->getid() ?>">Sửa</a>/<a href="?act=edit_room_for_hotel&room_id=<?php echo $room->getid() ?>&delete=yes">Xoá</a></td>
		
  		</tr>
	<?php } ?>
</table>
<a href="?act=edit_room_for_hotel&add=1&hotel_id=<?php echo $hotel_id?>"><img src="images/add_new.gif">Thêm Phòng</img></a>